<?php
namespace Common\Controller;
use Think\Controller;
class CommonController extends Controller {	
	//自动运行的类，用来登录页面后的页面判断是否已经登录
    public function _initialize(){      	
		if(!isset($_SESSION['id'])){
			$this->error('请先登录!',U('Login/index'));				
		}
    }       
}